<template>
  <div class="form">
    <el-form ref="form" :model="form" label-width="100px" >
      <el-form-item label="用户ID">
        <el-input v-model="form.id" placeholder="请输入用户ID" required></el-input>
      </el-form-item>
      <el-form-item label="用户昵称">
        <el-input v-model="form.name" placeholder="请输入用户昵称" required></el-input>
      </el-form-item>
      <el-form-item label="用户密码">
        <el-input v-model="form.pwd" placeholder="请输入用户密码" required></el-input>
      </el-form-item>
      <el-form-item label="用户性别">
        <el-select v-model="form.sex" placeholder="请选择用户性别" required>
          <el-option label="男" value="1"></el-option>
          <el-option label="女" value="2"></el-option>
          <el-option label="保密" value="3"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="微博链接">
        <el-input v-model="form.weibo" placeholder="请输入展示的微博的链接"></el-input>
      </el-form-item>
      <el-form-item label="邮箱链接">
        <el-input v-model="form.mail" placeholder="请输入展示的邮箱的链接"></el-input>
      </el-form-item>
      <el-form-item label="用户签名">
        <el-input type="textarea" v-model="form.desc" placeholder="请输入用户个性签名"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">立即创建</el-button>
        <el-button>取消</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
  export default {
    name: "addUser",
    data() {
      return {
        form: {
          name: '',
          id:'',
          pwd: '',
          sex: '',
          desc: '',
          weibo:'',
          mail:''
        }
      }
    },
    methods: {
      onSubmit() {
        console.log('submit!');
      }
    }
  }
</script>

<style scoped>
.form{
  width: 30%;
}
</style>
